package com.itheima.demo1;

import javafx.scene.web.WebErrorEvent;

import java.text.BreakIterator;
import java.util.EmptyStackException;
import java.util.Scanner;

public class Practice11 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        quit:while (true) {
            System.out.println("请输入要查看的星期数!"+"\n"+"(如无需查看.请输入0退出程序)");
            int week = sc.nextInt();
              //break只是结束了switch.没有结束while
            switch (week) {
                case 0:
                    System.out.println("感谢使用!");
                    //两种方式退出while死循环, 在while前边加个标号名如:quit  结束当前while 死循环  break quit;  或者 return
//                    return;
                    break quit;
                case 1:
                    System.out.println("周一:跑步");
                    break;
                case 2:
                    System.out.println("周二：游泳");
                    break;
                case 3:
                    System.out.println("周三：慢走");
                    break;
                case 4:
                    System.out.println("周四：动感单车");
                    break;
                case 5:
                    System.out.println("周五：拳击");
                    break;
                case 6:
                    System.out.println("周六：爬山");
                    break;
                case 7:
                    System.out.println("周日：好好吃一顿");
                    break;

                default:
                    System.out.println("输入周数错误!");
                    break;
            }
        }

    }
}
